<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    User
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @license    http://www.socialengine.net/license/
 * @version    $Id: index.tpl 8595 2011-03-12 02:12:54Z john $
 * @author     John
 */
?>
<?php
$this->headScript()
->appendFile($this->baseUrl() . '/externals/rcarusel/jquery-for-se.js');
$this->headScript()
->appendFile($this->baseUrl() . '/externals/rcarusel/jquery.ui.core.js')
->appendFile($this->baseUrl() . '/externals/rcarusel/jquery.ui.widget.js')
->appendFile($this->baseUrl() . '/externals/rcarusel/jquery.ui.rcarousel.js');

$this->headLink()->prependStylesheet($this->baseUrl().'/externals/rcarusel/skin.css');
?>   
<?php $this->headScript()->captureStart() ?>
  jQuery.noConflict();
<?php $this->headScript()->captureEnd() ?>
<?php if($this->friendsCount):?>
<h2 class="profile_gallery"><?php echo $this->translate('Friends')?></h2>

<div class="jcarousel-skin-tango">
	<a href="javascript:void(0)" class="ui-carousel-prev" id="ui-carousel-prev"></a>
	<div id="user_profile_friends_widget" class='profile_friends'>
		<?php foreach( $this->friends as $member ):?>
    		<div id="user_friend_<?php echo $member->getIdentity() ?>" class="slide">
				<?php echo $this->htmlLink($member->getHref(), $this->itemPhoto($member, 'thumb.icon')."<span>".$member->getTitle()."</span>", array('class' => 'profile_friends_icon')) ?>	  
    		</div>
  <?php endforeach; ?>
	</div>
	<a href="javascript:void(0)" class="ui-carousel-next" id="ui-carousel-next"></a>		
</div>
<?php endif;?>

<!--div class='slider-links'>
	<a href="/messages/compose"><?php echo $this->translate("Send Message")?></a>
	<a href="/videos/create"><?php echo $this->translate("Upload Video")?></a>
	<a href="/music/create"><?php echo $this->translate("Upload Music")?></a>
	<a href="/albums/upload"><?php echo $this->translate("Upload Photo")?></a>
</div-->

<div class="clear"></div>
	<script type="text/javascript">
	jQuery.noConflict();
	jQuery(document).ready(function() {
		jQuery( "#user_profile_friends_widget" ).rcarousel({
				visible: <?php echo (count($this->friends) >= $this->caruselVisible)? $this->caruselVisible : count($this->friends); ?>,
				auto: {enabled: true},
				step: 1,
				width: 110
			});			
		});
	</script>
		
